package com.ktjy.pojo.system;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serial;
import java.io.Serializable;

/**
 * 系统菜单表实体类
 *
 * @author LILIBO
 * @since 2025-06-18
 */
@Tag(name = "系统菜单表", description = "系统菜单表数据")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@TableName("`sys_menu`")
public class SysMenu implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 菜单ID
     */
    @Schema(description = "菜单ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 父级菜单ID
     */
    @Schema(description = "父级菜单ID")
    private Long parentId;

    /**
     * 菜单类型 0-系统;1-模块;2-功能;3-按钮
     */
    @Schema(description = "菜单类型 0-系统;1-模块;2-功能;3-按钮")
    private Integer menuType;

    /**
     * 菜单名称
     */
    @Schema(description = "菜单名称")
    private String menuName;

    /**
     * 显示顺序
     */
    @Schema(description = "显示顺序")
    private Integer menuSort;

    /**
     * 菜单图标
     */
    @Schema(description = "菜单图标")
    private String menuIcon;

    /**
     * 关联的表
     */
    @Schema(description = "关联的表")
    private String refTable;

    /**
     * 权限标识
     */
    @Schema(description = "权限标识")
    private String perms;

    /**
     * 路由名称
     */
    @Schema(description = "路由名称")
    private String route;

    /**
     * 路由地址
     */
    @Schema(description = "路由地址")
    private String path;

    /**
     * 路由组件
     */
    @Schema(description = "路由组件")
    private String component;

    /**
     * 路由参数
     */
    @Schema(description = "路由参数")
    private String query;

    /**
     * 外链标识 0-否;1-是
     */
    @Schema(description = "外链标识 0-否;1-是")
    private Integer frameFlag;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 状态 0-启用;1-禁用
     */
    @Schema(description = "状态 0-启用;1-禁用")
    private Integer status;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private String createTime;

    /**
     * 修改时间
     */
    @Schema(description = "修改时间")
    private String modifyTime;

    /**
     * 删除标记 0-正常;1-删除
     */
    @Schema(description = "删除标记 0-正常;1-删除")
    private Integer deleteFlag;

    /**
     * 带参构造方法
     */
    public SysMenu(Long parentId, Integer menuType, String menuName, Integer menuSort, String menuIcon, String refTable, String perms, String route, String path, String component, String query, Integer frameFlag, String remark, Integer status, String createTime, String modifyTime, Integer deleteFlag) {
        this.parentId = parentId;
        this.menuType = menuType;
        this.menuName = menuName;
        this.menuSort = menuSort;
        this.menuIcon = menuIcon;
        this.refTable = refTable;
        this.perms = perms;
        this.route = route;
        this.path = path;
        this.component = component;
        this.query = query;
        this.frameFlag = frameFlag;
        this.remark = remark;
        this.status = status;
        this.createTime = createTime;
        this.modifyTime = modifyTime;
        this.deleteFlag = deleteFlag;
    }

}
